//package leetcode.easy;
//
//import java.util.Arrays;
//import java.util.HashSet;
//import java.util.Set;
//
//class Solution {
//    public int[] fairCandySwap(int[] aliceSizes, int[] bobSizes) {
//        int sumA = Arrays.stream(aliceSizes).sum();
//        int sumB = Arrays.stream(bobSizes).sum();
//        int delt = (sumA - sumB) / 2;
//        Set<Integer> rec = new HashSet<>();
//        for (int num : aliceSizes) {
//            rec.add(num);
//        }
//        int[] ans = new int[2];
//        for (int y : bobSizes) {
//            int x = y + delt;
//            if (rec.contains(x)) {
//                ans[0] = x;
//                ans[1] = y;
//                break;
//            }
//        }
//        return ans;
//    }
//}
//
//public class Test58 {
////    public static void main(String[] args) {
////        Solution solution = new Solution();
////        int[] arr1 = new int[]{1, 2, 3};
////        int[] arr2 = new int[]{2, 2, 3};
////        solution.fairCandySwap(arr1, arr2);
////    }
//}
